package com.hougong.im.body.response;

import com.hougong.im.annotation.ProtocolField;
import com.hougong.im.body.BaseBodyCodec;

/**
 * 登录响应 0x0033
 */
public class LoginResponse extends BaseBodyCodec<LoginResponse> {
    public static final byte  Success_Flag=0x00;
    public static final byte  Error_Flag=0x01;
    public static final String Success_Tips="登录成功";
    public static final String Error_Tips="账号或者密码错误";
    public static final String Error_Token="0";
    /**
     * 0x00登录成功 0x01账号或者密码错误
     */
    @ProtocolField(sort =1)
    private byte flag;
    @ProtocolField(sort = 2)
    private short tipsLen;
    @ProtocolField(sort = 3,lenField = "tipsLen")
    private String tips;
    @ProtocolField(sort = 4)
    private int tokenLen;
    /**
     *  当登录成功的时候有token  当登录失败的时候token填充为 “0”
     */
    @ProtocolField(sort = 5,lenField = "tokenLen")
    private String token;
    /**
     * 用户id
     */
    @ProtocolField(sort = 6)
    private long  uid;

    public byte getFlag() {
        return flag;
    }

    public void setFlag(byte flag) {
        this.flag = flag;
    }

    public short getTipsLen() {
        return tipsLen;
    }

    public void setTipsLen(short tipsLen) {
        this.tipsLen = tipsLen;
    }

    public String getTips() {
        return tips;
    }

    public void setTips(String tips) {
        this.tips = tips;
    }

    public int getTokenLen() {
        return tokenLen;
    }

    public void setTokenLen(int tokenLen) {
        this.tokenLen = tokenLen;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public long getUid() {
        return uid;
    }

    public void setUid(long uid) {
        this.uid = uid;
    }
}
